package com.company.thread;

/**
 * @description: some desc
 * @author: ruoan
 * @date: 2020/10/23 14:17
 */
public class MyThread6 {


    //待决中断

    public static void main(String[] args) {
        Thread mainThread = Thread.currentThread();
        System.out.println("是否中断checkpointA："+mainThread.isInterrupted());
        mainThread.interrupt();
        System.out.println("是否中断checkpointB："+mainThread.isInterrupted());
        try {
            System.out.println("是否中断checkpointC："+mainThread.isInterrupted());
            Thread.sleep(200);
        } catch (InterruptedException e) {
            System.out.println("是否中断checkpointD："+mainThread.isInterrupted());
            e.printStackTrace();
        }


    }
}
